package com.wish.finance.controller;


import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wish.finance.entity.CostType;
import com.wish.finance.entity.ItemType;
import com.wish.finance.entity.TCwPaymentPlan;
import com.wish.finance.entity.TSfContract;
import com.wish.finance.entity.vo.TCwPaymentPlanVo;
import com.wish.finance.entity.vo.TSfContractVo;
import com.wish.finance.service.ITCwPaymentPlanService;
import com.wish.finance.service.ITSfContractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import org.springframework.stereotype.Controller;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 高锦涛
 * @since 2022-03-26
 */
@RestController
public class TSfContractController {

    @Autowired
    ITSfContractService itSfContractService;

    //收房合同查询
    @GetMapping("contractQuery")
    public PageInfo<TSfContractVo> contractQuery(TSfContractVo tSfContract,
                                               @RequestParam(defaultValue = "1")Integer pageNum,
                                               @RequestParam(defaultValue = "2")Integer pageSize){
        PageHelper.startPage(pageNum,pageSize);

        List<TSfContractVo> list = itSfContractService.contractQuery(tSfContract);

        return new PageInfo<TSfContractVo>(list);
    }



}
